{php include wl_template('common/header');}
<ul class="nav nav-tabs">
	<li {if empty($_GPC['status'])}class="active"{/if}><a href="{php echo web_url('storeqr/sqrcode/qrlist');}">所有二维码</a></li>
	<li {if $_GPC['status'] == 1}class="active"{/if}><a href="{php echo web_url('storeqr/sqrcode/qrlist',array('status' => 1));}">未绑定</a></li>
	<li {if $_GPC['status'] == 2}class="active"{/if}><a href="{php echo web_url('storeqr/sqrcode/qrlist',array('status' => 2));}">已绑定</a></li>
	<li {if $_GPC['status'] == 3}class="active"{/if}><a href="{php echo web_url('storeqr/sqrcode/qrlist',array('status' => 3));}">已失效</a></li>
</ul>
<div class="app-content">
	<div class="app-filter">
		<div class="filter-list">
			<form action="./index.php" method="get" class="form-horizontal" role="form">
				<input type="hidden" name="c" value="site" />
				<input type="hidden" name="a" value="entry" />
				<input type="hidden" name="m" value="{MODULE_NAME}" />
				<input type="hidden" name="p" value="storeqr" />
				<input type="hidden" name="ac" value="sqrcode" />
				<input type="hidden" name="do" value="qrlist" />
				<input type="hidden" name="status" value="{$_GPC['status']}" />
				<input type="hidden" name="model" value="{$_GPC['model']}" />
				<div class="form-group">
					<label class="col-sm-2 control-label">类型</label>
					<div class="col-sm-9">
						<div class="btn-group">
							<a href="{php echo Storeqr::filter_url('model:-1');}" class="btn {if $_GPC['model'] == -1 || $_GPC['model'] == ''}btn-primary{else}btn-default{/if}">不限</a>
							<a href="{php echo Storeqr::filter_url('model:1');}" class="btn {if $_GPC['model'] == 1}btn-primary{else}btn-default{/if}">临时</a>
							<a href="{php echo Storeqr::filter_url('model:2');}" class="btn {if $_GPC['model'] == 2}btn-primary{else}btn-default{/if}">含参</a>
							<a href="{php echo Storeqr::filter_url('model:3');}" class="btn {if $_GPC['model'] == 3}btn-primary{else}btn-default{/if}">智能</a>
						</div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">二维码信息</label>
					<div class="col-sm-9">
						<input type="text" name="keyword" class="form-control" value="{$keyword}" placeholder="请输入二维码编号或场景备注">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">生成时间</label>
					<div class="col-sm-9">
						{php echo tpl_select_time_info('time', array('starttime'=>date('Y-m-d H:i:s', $starttime),'endtime'=>date('Y-m-d H:i:s', $endtime)),'true');}
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label"></label>
					<div class="col-sm-9">
						<button class="btn btn-primary"><i class="fa fa-search"></i> 搜索</button>
						<button class="btn btn-default min-width" name="export" type="submit" value="export"><i class="fa fa-download"></i> 导出二维码</button>
					</div>
				</div>
			</form>
		</div>
	</div>
	<div class="app-table-list">
		<div class="table-responsive">
			<table class="table table-hover">
				<thead>
				<tr>
					<th style="width:100px;">二维码编号</th>
					{if !is_agent()}
					<th style="width:80px;">所属代理</th>
					{/if}
					<th style="width:80px;">使用状态</th>
					<th style="width:80px;">场景备注</th>
					<th style="width:60px;">二维码类型</th>
					<th style="width:60px;">二维码</th>
					<th style="width:100px;">生成时间</th>
				</tr>
				</thead>
				<tbody>
				{loop $list $row}
				<tr>
					<td>{php echo $row['cardsn']}</td>
					{if !is_agent()}
					<td>{php echo $row['agentname']}</td>
					{/if}
					<td>{if $row['sid']}<span class="label label-primary">已绑定</span>{else}{if $row['status'] == 3}<span class="label label-default">已失效</span>{else}<span class="label label-success">未绑定</span>{/if}{/if}</td>
					<td>{$row['remark']}</td>
					<td><span class="label label-{if $row['modellabel'] == '含参'}danger{elseif $row['modellabel'] == '智能'}warning{else}primary{/if}">{$row['modellabel']}</span></td>
					<td><a href="javascript:void(0);" onclick="javascript:layer.open({type: 2,title: '商户二维码',shadeClose: true,shade: 0.8,area: ['440px', '475px'],content: '{$row['showurl']}'});">查看</a></td>
					<td style="font-size:12px; color:#666;">
						{php echo date('Y-m-d <br /> H:i:s', $row[createtime]);}
					</td>
				</tr>
				{/loop}
				</tbody>
			</table>
		</div>
		<div class="app-table-foot clearfix">
			<div class="pull-left">
				
			</div>
			<div class="pull-right">
				{$pager}
			</div>
		</div>
	</div>
</div>
{php include wl_template('common/footer');}